/*
* @Author: luocheng
* @Date:   2019-12-15 16:55:50
* @Last Modified by:   luocheng
* @Last Modified time: 2019-12-29 11:17:19
*/
import {HTTP} from '../util/http.js'

class LikeModel extends HTTP {
	like(behavior, artID, category){
		let url = behavior == 'likes'?'like':'like/cancel'
		this.request({
			url: url,
			method: 'POST',
			data: {
				art_id: artID,
				type: category
			}
		})
	}

	getClassicLikeStatus(artID, category, sCallback){
		this.request({
			url: `classic/${category}/${artID}/favor`,
			success: sCallback
		})
	}
}
export {LikeModel}